package com.neuedu.ssm.controller;

import com.neuedu.ssm.po.Dept;
import com.neuedu.ssm.service.IDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 金山
 * 项目：springmvc-learn
 * site: https://blog.fulfill.com.cn
 * 描述
 * @data 2025/3/1814:33
 */
@RestController
@RequestMapping("/dept")
public class DeptController {

    @Autowired
    private IDeptService deptService;


    @GetMapping("/{id}")
    public Dept getByid(@PathVariable long id){

        return deptService.getById(id);
    }



}
